﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using YSGetLatest.DataObjects;

namespace UnitTests.DataObjects
{
	/// <summary>
	/// Summary description for ProjectTest
	/// </summary>
	[TestClass]
	public class ProjectTest
	{
		/// <summary>
		/// A test for serialization
		/// </summary>
		[TestMethod]
		public void SerializationTest()
		{
			var project = new Project
			{
				Name = "the name",
				SourceLocation = "$/Company/Project",
				Branch = "Dev"
			};

			project.Folders.Add(new Folder
			{
				Name = "disk path 1",
				Enabled = true
			});

			project.Folders.Add(new Folder
			{
				Name = "disk path 2",
				Enabled = false
			});

			project.Folders.Add(new Folder
			{
				Name = "disk path 3",
				Enabled = true
			});

			Utils.TestXmlSerialization(project);
		}
	}
}
